package com.sen.patterns.creational.builder.ex2;

public class TruckBuilder extends AutoBuilder {
	private Truck truck;
	
	public void buildBase() {
		System.out.println("TruckBuilder-->buildBase()");
		truck = new Truck();
	}
	
	// 装配方法不一样
	public void addAutomobileItem(PartItem item) {
		System.out.println("TruckBuilder-->addAutomobileItem()");
		truck.add(item);
	}
	
	// 测试汽车方法
	public void testAutomobile() {
		System.out.println("TruckBuilder-->checkAutomobileItem()");
	}
	
	// 返回装配好的汽车
	public Automobile getFinishedAutomobile() {
		System.out.println("TruckBuilder-->getFinishedAutomobile()");
		return truck;
	}
}
